home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1599 / 1231 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  2.2 KB

  1. Subject: Re: Mint 1.10: Bug in Fselect()
  2. Date: Mon, 21 Mar 94 22:13:50 CET
  3. From: Juergen Lock <nox@jelal.north.de>
  4. In-Reply-To: <9403210822.AA05825@hera.rbi.informatik.uni-frankfurt.de>; from "Kay Roemer" at Mar 21, 94 9:22 am
  5. Message-Id: <9403212113.AA00065@jelal.north.de>
  6.  
  7. Kay Roemer writes:
  8. > This makes Fselect interruptible by signals. This feature was present
  9. > in MiNT 1.09, but was lost in 1.10.
  10. > Without this patch inetd and some other programs do not work correctly.
  11. > Kay.
  12. > --8<-------------- cut here ----------------------------
  13. > *** dosfile.c.orig    Mon Mar  7 20:09:06 1994
  14. > --- dosfile.c    Mon Mar  7 20:34:44 1994
  15. > ***************
  16. > *** 1040,1046 ****
  17. >       /* curproc->wait_cond changes when data arrives or the timeout happens */
  18. >           while (curproc->wait_cond == (long)wakeselect) {
  19. >               TRACE(("sleeping in Fselect"));
  20. > !             sleep(SELECT_Q, (long)wakeselect);
  21. >           }
  22. >           spl(sr);
  23. >   
  24. > --- 1040,1049 ----
  25. >       /* curproc->wait_cond changes when data arrives or the timeout happens */
  26. >           while (curproc->wait_cond == (long)wakeselect) {
  27. >               TRACE(("sleeping in Fselect"));
  28. > !             if (sleep(SELECT_Q, (long)wakeselect)) {
  29. > !                 /* interrupted by signals */
  30. > !                 break;
  31. > !             }
  32. >           }
  33. >           spl(sr);
  34. >   
  35. > --8<-------------- cut here ----------------------------
  36.  
  37.  ahaa so my last patch should better be changed like this?
  38.  
  39. Index: dosfile.c
  40. @@ -1045,6 +1045,7 @@
  41.      }
  42.  
  43.      if (count == 0) {
  44. +        ulong onsigs;
  45.          /* OK, now let's set a timeout */
  46.  
  47.          if (timeout) {
  48. @@ -1057,6 +1058,7 @@
  49.          sr = spl7();
  50.  
  51.      /* curproc->wait_cond changes when data arrives or the timeout happens */
  52. +        onsigs = curproc->nsigs;
  53.          while (curproc->wait_cond == (long)wakeselect) {
  54.  #if 0
  55.  /* better not call BIOS with interrupts off, especially not Bconin... :) */
  56. @@ -1068,6 +1070,8 @@
  57.                  check_sigs();
  58.                  sr = spl7();
  59.              }
  60. +            if (onsigs != curproc->nsigs)
  61. +                break;
  62.          }
  63.          spl(sr);
  64.  
  65.  or _must_ check_sigs run at level 7 here?  then stopping the modem1
  66. receiver overruns could get a bit harder...
  67.  
  68.  cheers
  69.     Juergen
  70. -- 
  71. J"urgen Lock / nox@jelal.north.de / UUCP: ..!uunet!unido!uniol!jelal!nox
  72.                                 ...ohne Gewehr
  73. PGP public key fingerprint =  8A 18 58 54 03 7B FC 12  1F 8B 63 C7 19 27 CF DA 
  74.